package com.tt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tt.pojo.Student;
import com.tt.vo.SySResult;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface StudentMapper extends BaseMapper<Student> {

    @Select("select count(1) from student")
    long findTotal();

    List<Student> findStudentByPage(@Param("start") int start, @Param("size") int size,
                                    @Param("name") String name,@Param("sex") String sex);
    @Delete("delete from student where id = #{id}")
    SySResult deleteStudentById(Long id);

    List<Student> getStudentAll(String name);

}
